package com.paypal.android.MEP.b;

import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
import android.graphics.drawable.StateListDrawable;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnTouchListener;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.LinearLayout.LayoutParams;
import android.widget.TextView;
import com.paypal.android.MEP.PayPalActivity;
import com.paypal.android.MEP.e;
import com.paypal.android.a.a.k;
import com.paypal.android.a.j;
import com.paypal.android.a.q;
import com.paypal.android.b.o;
import java.math.BigDecimal;
import java.util.Hashtable;
import java.util.Vector;

public final class a extends o
  implements View.OnTouchListener, com.paypal.android.MEP.r
{
  private static com.paypal.android.b.f l = null;
  private static boolean q = false;
  boolean a = false;
  Vector b = null;
  private GradientDrawable g;
  private GradientDrawable h;
  private c i;
  private LinearLayout j;
  private LinearLayout k = null;
  private TextView m = null;
  private com.paypal.android.MEP.a.a n = null;
  private Vector o = new Vector(3);
  private Vector p = new Vector(3);
  private int r = 0;
  private d s = null;
  private View.OnClickListener t = new g(this);
  private String u = null;

  public a(Context paramContext, c paramc, com.paypal.android.MEP.a.a parama)
  {
    super(paramContext);
    setOnTouchListener(this);
    this.n = parama;
    this.i = paramc;
    setBackgroundColor(-16711681);
    a(new LinearLayout.LayoutParams(-1, -2), 0);
    a(new LinearLayout.LayoutParams(-1, -2), 1);
    this.g = com.paypal.android.a.f.a(-1, -1510918, -3154193);
    this.h = com.paypal.android.a.f.a(-1, -4336918, -3154193);
    setBackgroundDrawable(this.g);
    setGravity(16);
    GradientDrawable localGradientDrawable = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] { -10066330, -3487030 });
    localGradientDrawable.setCornerRadii(new float[] { 0.0F, 0.0F, 0.0F, 0.0F, 5.0F, 5.0F, 5.0F, 5.0F });
    localGradientDrawable.setStroke(2, -10066330);
    c(localGradientDrawable);
    a(com.paypal.android.a.g.a(111410, 464));
    b(com.paypal.android.a.g.a(118786, 430));
    this.c.setOrientation(1);
    LinearLayout localLinearLayout1 = com.paypal.android.a.f.a(paramContext, -1, -2);
    localLinearLayout1.setOrientation(0);
    localLinearLayout1.setGravity(16);
    TextView localTextView = q.a(com.paypal.android.a.r.c, paramContext);
    String str;
    LinearLayout localLinearLayout2;
    if (this.i == c.a)
    {
      str = j.a("ANDROID_funding") + ":";
      localTextView.setText(str);
      localTextView.setGravity(3);
      localLinearLayout1.addView(localTextView);
      localLinearLayout1.addView(this.e);
      this.e.setVisibility(0);
      this.c.addView(localLinearLayout1);
      this.k = com.paypal.android.a.f.a(paramContext, -1, -2);
      this.k.setOrientation(1);
      a(paramContext, this.k);
      this.c.addView(this.k);
      this.j = com.paypal.android.a.f.a(paramContext, -1, -2);
      this.j.setOrientation(0);
      this.j.setGravity(16);
      localLinearLayout2 = com.paypal.android.a.f.a(paramContext, -1, -2);
      localLinearLayout2.setOrientation(1);
      localLinearLayout2.setGravity(1);
      this.m = q.a(com.paypal.android.a.r.f, paramContext);
      this.m.setLayoutParams(new LinearLayout.LayoutParams(-1, -1));
      this.m.setTextColor(-13408615);
      this.m.setText(j.a("ANDROID_getting_information"));
      this.m.setGravity(1);
      this.m.setSingleLine(false);
      localLinearLayout2.addView(this.m);
      if (this.i == c.a)
      {
        if (l != null)
          break label760;
        l = new com.paypal.android.b.f(paramContext);
      }
    }
    while (true)
    {
      l.setGravity(1);
      this.j.addView(l);
      this.j.addView(localLinearLayout2);
      this.j.setVisibility(8);
      this.c.addView(this.j);
      if (this.i == c.b)
        b(false);
      q = false;
      return;
      if (this.i == c.b)
      {
        str = j.a("ANDROID_fee") + ":";
        break;
      }
      if (e.a().l() == 1)
      {
        str = j.a("ANDROID_mailing_address") + ":";
        break;
      }
      str = j.a("ANDROID_ship_to") + ":";
      break;
      label760: ((LinearLayout)l.getParent()).removeAllViews();
    }
  }

  private Button a(Context paramContext, String paramString, int paramInt)
  {
    Button localButton = new Button(paramContext);
    localButton.setText(paramString);
    LinearLayout.LayoutParams localLayoutParams = new LinearLayout.LayoutParams(-1, com.paypal.android.a.f.b());
    localLayoutParams.setMargins(0, 3, 0, 2);
    localButton.setLayoutParams(localLayoutParams);
    localButton.setGravity(17);
    StateListDrawable localStateListDrawable = new StateListDrawable();
    GradientDrawable localGradientDrawable1 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] { -328451, -4336918 });
    GradientDrawable localGradientDrawable2 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] { -6702886, -11966331 });
    GradientDrawable localGradientDrawable3 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] { -13605994, -16764058 });
    GradientDrawable localGradientDrawable4 = new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, new int[] { 2140780762, 2135517317 });
    localGradientDrawable1.setCornerRadius(5.0F);
    localGradientDrawable1.setStroke(1, -6307088);
    localGradientDrawable2.setCornerRadius(5.0F);
    localGradientDrawable2.setStroke(1, -10650469);
    localGradientDrawable3.setCornerRadius(5.0F);
    localGradientDrawable3.setStroke(1, -16764058);
    localGradientDrawable4.setCornerRadius(5.0F);
    localGradientDrawable4.setStroke(1, 2136833179);
    localStateListDrawable.addState(new int[] { 16842910, -16842919, -16842908 }, localGradientDrawable1);
    localStateListDrawable.addState(new int[] { 16842910, -16842919, 16842908 }, localGradientDrawable2);
    localStateListDrawable.addState(new int[] { 16842910, 16842919, -16842908 }, localGradientDrawable3);
    localStateListDrawable.addState(new int[] { 16842910, 16842919, 16842908 }, localGradientDrawable3);
    localStateListDrawable.addState(new int[] { -16842910, -16842919, -16842908 }, localGradientDrawable4);
    localStateListDrawable.addState(new int[] { -16842910, -16842919, 16842908 }, localGradientDrawable4);
    localStateListDrawable.addState(new int[] { -16842910, 16842919, -16842908 }, localGradientDrawable4);
    localStateListDrawable.addState(new int[] { -16842910, 16842919, 16842908 }, localGradientDrawable4);
    localButton.setBackgroundDrawable(localStateListDrawable);
    localButton.setTextColor(-16777216);
    localButton.setFocusable(true);
    localButton.setOnClickListener(this.t);
    if (this.i == c.a)
      localButton.setId(0x7F000000 | paramInt);
    do
    {
      return localButton;
      if (this.i == c.b)
      {
        localButton.setId(0x7E000000 | paramInt);
        return localButton;
      }
    }
    while (this.i != c.c);
    localButton.setId(0x7D000000 | paramInt);
    return localButton;
  }

  private void a(Context paramContext, LinearLayout paramLinearLayout)
  {
    Hashtable localHashtable;
    Vector localVector3;
    Object localObject1;
    label61: int i3;
    k localk1;
    String str9;
    BigDecimal localBigDecimal2;
    String str10;
    String str11;
    com.paypal.android.b.g localg5;
    int i4;
    label176: label236: BigDecimal localBigDecimal3;
    BigDecimal localBigDecimal4;
    Object localObject2;
    Object localObject3;
    int i6;
    label433: k localk2;
    Object localObject5;
    Object localObject4;
    if (e.a().k() == 2)
    {
      localHashtable = com.paypal.android.MEP.a.a.a;
      if (this.i != c.a)
        break label1468;
      localVector3 = (Vector)localHashtable.get("FundingPlans");
      if ((localVector3 != null) && (localVector3.size() != 0))
        break label534;
      localObject1 = (com.paypal.android.a.a.c)localHashtable.get("DefaultFundingPlan");
      i3 = 0;
      if (i3 >= ((com.paypal.android.a.a.c)localObject1).d.size())
        break label1269;
      localk1 = (k)((com.paypal.android.a.a.c)localObject1).d.get(i3);
      str9 = localk1.a.b();
      localBigDecimal2 = localk1.a.a();
      str10 = localk1.b.c();
      str11 = localk1.b.b();
      if (str11 == null)
        str11 = "";
      localg5 = new com.paypal.android.b.g(paramContext, com.paypal.android.a.r.d, com.paypal.android.a.r.d);
      if (e.a().h().contains("fr_"))
        break label584;
      i4 = 1;
      if (str10.indexOf("BALANCE") == -1)
        break label636;
      if (i4 == 0)
        break label590;
      localg5.a(localk1.b.a() + " (" + str9 + "):");
      localg5.b(j.a(localBigDecimal2, str9));
      paramLinearLayout.addView(localg5);
      if (str10.equals("BANK_DELAYED"))
      {
        TextView localTextView2 = q.a(com.paypal.android.a.r.f, paramContext);
        localTextView2.setLayoutParams(new LinearLayout.LayoutParams(-1, -2, 0.5F));
        localTextView2.setPadding(2, 2, 2, 2);
        localTextView2.setBackgroundColor(0);
        localTextView2.setText(j.a("ANDROID_echeck_note"));
        paramLinearLayout.addView(localTextView2);
      }
      localBigDecimal3 = new BigDecimal("0");
      if ((((com.paypal.android.a.a.c)localObject1).b != null) && (((com.paypal.android.a.a.c)localObject1).b.a() != null))
        localBigDecimal3 = ((com.paypal.android.a.a.c)localObject1).b.a();
      localBigDecimal4 = e.a().c().h();
      if (str9.equals(e.a().c().a()))
        break label1248;
      localObject2 = ((com.paypal.android.a.a.c)localObject1).a.a().subtract(((com.paypal.android.a.a.c)localObject1).c.b.a());
      localObject3 = ((com.paypal.android.a.a.c)localObject1).c.a.a();
      i6 = 0;
      if (i6 >= ((com.paypal.android.a.a.c)localObject1).d.size())
        break label1147;
      localk2 = (k)((com.paypal.android.a.a.c)localObject1).d.elementAt(i6);
      if (!((com.paypal.android.a.a.c)localObject1).a.b().equals(localk2.a.b()))
        break label1125;
      BigDecimal localBigDecimal5 = ((BigDecimal)localObject2).subtract(localk2.a.a());
      Object localObject6 = localObject3;
      localObject5 = localBigDecimal5;
      localObject4 = localObject6;
    }
    while (true)
    {
      while (true)
      {
        i6++;
        localObject2 = localObject5;
        localObject3 = localObject4;
        break label433;
        localHashtable = com.paypal.android.a.c.f().h();
        break;
        label534: com.paypal.android.a.a.c localc2 = (com.paypal.android.a.a.c)localVector3.elementAt(0);
        try
        {
          com.paypal.android.a.a.c localc3 = (com.paypal.android.a.a.c)localVector3.elementAt(Integer.parseInt((String)localHashtable.get("FundingPlanId")));
          localObject1 = localc3;
        }
        catch (Exception localException2)
        {
          localObject1 = localc2;
        }
      }
      break label61;
      label584: i4 = 0;
      break label176;
      label590: localg5.a(localk1.b.a() + " (" + str9 + ") :");
      break label236;
      label636: if (str10.equals("BANK_DELAYED"))
      {
        if ((str11 == null) || (str11.length() <= 0))
        {
          if (i4 != 0)
          {
            localg5.a(localk1.b.a() + " (" + j.a("ANDROID_echeck") + "):");
            break label236;
          }
          localg5.a(localk1.b.a() + " (" + j.a("ANDROID_echeck") + ") :");
          break label236;
        }
        if (i4 != 0)
        {
          localg5.a(localk1.b.a() + " x" + str11 + " (" + j.a("ANDROID_echeck") + "):");
          break label236;
        }
        localg5.a(localk1.b.a() + " x" + str11 + " (" + j.a("ANDROID_echeck") + ") :");
        break label236;
      }
      if (str10.equals("BANK_INSTANT"))
      {
        if ((str11 == null) || (str11.length() <= 0))
        {
          localg5.a(localk1.b.a() + ":");
          break label236;
        }
        localg5.a(localk1.b.a() + " x" + str11 + ":");
        break label236;
      }
      if ((str10.equals("CREDITCARD")) || (str10.equals("DEBITCARD")))
      {
        if ((str11 == null) || (str11.length() <= 0))
        {
          localg5.a(localk1.b.a() + ":");
          break label236;
        }
        localg5.a(localk1.b.a() + " x" + str11 + ":");
        break label236;
      }
      localg5.a(localk1.b.a());
      break label236;
      label1125: localObject4 = ((BigDecimal)localObject3).subtract(localk2.a.a());
      localObject5 = localObject2;
    }
    label1147: int i5;
    if ((((BigDecimal)localObject2).compareTo(BigDecimal.ZERO) != 0) || (((BigDecimal)localObject3).compareTo(BigDecimal.ZERO) != 0))
      i5 = 1;
    label1468: label1599: 
    while (true)
    {
      if (i5 != 0)
      {
        TextView localTextView1 = q.a(com.paypal.android.a.r.f, paramContext);
        localTextView1.setLayoutParams(new LinearLayout.LayoutParams(-1, -2, 0.5F));
        localTextView1.setPadding(2, 2, 2, 2);
        localTextView1.setBackgroundColor(0);
        localTextView1.setText(j.a("ANDROID_negative_balance"));
        paramLinearLayout.addView(localTextView1);
      }
      i3++;
      break;
      i5 = 0;
      continue;
      label1248: if (localBigDecimal2.compareTo(localBigDecimal4.add(localBigDecimal3)) > 0)
      {
        i5 = 1;
        continue;
        label1269: com.paypal.android.a.a.f localf = ((com.paypal.android.a.a.c)localObject1).c;
        if (localf != null)
        {
          float f = Float.parseFloat(localf.a());
          com.paypal.android.b.g localg4 = new com.paypal.android.b.g(paramContext, com.paypal.android.a.r.f, com.paypal.android.a.r.f);
          localg4.a("1 " + localf.a.b() + " = " + f + " " + localf.b.b());
          localg4.b("");
          paramLinearLayout.addView(localg4);
        }
        boolean bool2 = true;
        boolean bool3;
        if ((localVector3 != null) && (localVector3.size() > 0))
        {
          if (localVector3.size() > 1)
          {
            bool3 = true;
            bool2 = bool3;
          }
        }
        else
        {
          if ((((k)((com.paypal.android.a.a.c)localObject1).d.elementAt(0)).b.c().equals("BALANCE")) && (((com.paypal.android.a.a.c)localObject1).d.size() == 1))
            bool2 = false;
          b(bool2);
        }
        while (true)
        {
          return;
          bool3 = false;
          break;
          if (this.i == c.b);
          try
          {
            int i2 = Integer.parseInt((String)localHashtable.get("FundingPlanId"));
            Vector localVector2 = (Vector)localHashtable.get("FundingPlans");
            com.paypal.android.a.a.c localc1;
            com.paypal.android.b.g localg3;
            if ((localVector2 == null) || (localVector2.size() == 0))
            {
              localc1 = (com.paypal.android.a.a.c)localHashtable.get("DefaultFundingPlan");
              if (localc1 != null)
              {
                com.paypal.android.a.a.a locala = localc1.b;
                if (locala != null)
                {
                  BigDecimal localBigDecimal1 = locala.a();
                  String str8 = locala.b();
                  localg3 = new com.paypal.android.b.g(paramContext, com.paypal.android.a.r.d, com.paypal.android.a.r.d);
                  if (localBigDecimal1.compareTo(BigDecimal.ZERO) > 0)
                  {
                    localg3.a(j.a("ANDROID_i_pay"));
                    localg3.b(j.a(localBigDecimal1, str8));
                    paramLinearLayout.addView(localg3);
                    if (localBigDecimal1.compareTo(BigDecimal.ZERO) <= 0)
                      b(false);
                  }
                }
              }
            }
            else
            {
              while (true)
              {
                b(false);
                return;
                localc1 = (com.paypal.android.a.a.c)localVector2.elementAt(i2);
                break;
                localg3.a(j.a("ANDROID_free"));
                break label1599;
                com.paypal.android.b.g localg2 = new com.paypal.android.b.g(paramContext, com.paypal.android.a.r.d, com.paypal.android.a.r.d);
                localg2.a(j.a("ANDROID_free"));
                paramLinearLayout.addView(localg2);
              }
              if (this.i == c.c)
              {
                Vector localVector1 = (Vector)localHashtable.get("AvailableAddresses");
                String str1 = (String)localHashtable.get("ShippingAddressId");
                if ((localVector1 != null) && (localVector1.size() > 0))
                {
                  com.paypal.android.a.a.h localh = null;
                  for (int i1 = 0; i1 < localVector1.size(); i1++)
                  {
                    localh = (com.paypal.android.a.a.h)localVector1.elementAt(i1);
                    if (localh.h().equals(str1))
                      break;
                  }
                  if (localh != null)
                  {
                    String str2 = localh.a();
                    String str3 = localh.d();
                    String str4 = localh.e();
                    String str5 = localh.b();
                    String str6 = localh.g();
                    String str7 = localh.f();
                    com.paypal.android.b.g localg1 = new com.paypal.android.b.g(paramContext, com.paypal.android.a.r.d, com.paypal.android.a.r.d);
                    StringBuffer localStringBuffer = new StringBuffer();
                    if ((str2 != null) && (str2.length() > 0))
                      localStringBuffer.append(str2 + "\n");
                    if ((str3 != null) && (str3.length() > 0))
                    {
                      localStringBuffer.append(str3);
                      if ((str4 != null) && (str4.length() > 0))
                        localStringBuffer.append(", ");
                    }
                    if ((str4 != null) && (str4.length() > 0))
                      localStringBuffer.append(str4);
                    if (((str3 != null) && (str3.length() > 0)) || ((str4 != null) && (str4.length() > 0)))
                      localStringBuffer.append("\n");
                    if ((str5 != null) && (str5.length() > 0))
                    {
                      localStringBuffer.append(str5);
                      if (((str6 != null) && (str6.length() > 0)) || ((str7 != null) && (str7.length() > 0)))
                        localStringBuffer.append(", ");
                    }
                    if ((str6 != null) && (str6.length() > 0))
                    {
                      localStringBuffer.append(str6);
                      if ((str7 != null) && (str7.length() > 0))
                        localStringBuffer.append(" ");
                    }
                    if ((str7 != null) && (str7.length() > 0))
                      localStringBuffer.append(str7);
                    localg1.a(localStringBuffer.toString());
                    if (localVector1.size() > 1);
                    for (boolean bool1 = true; ; bool1 = false)
                    {
                      b(bool1);
                      paramLinearLayout.addView(localg1);
                      return;
                    }
                  }
                }
              }
            }
          }
          catch (Exception localException1)
          {
            return;
          }
        }
      }
      else
      {
        i5 = 0;
      }
    }
  }

  private void c(boolean paramBoolean)
  {
    if (paramBoolean)
    {
      this.k.setVisibility(8);
      this.j.setVisibility(0);
      l.a();
      return;
    }
    l.b();
    this.j.setVisibility(8);
    this.k.setVisibility(0);
  }

  private void f()
  {
    this.b = new Vector();
    Hashtable localHashtable1;
    int i1;
    label38: com.paypal.android.a.a.c localc;
    com.paypal.android.a.a.g localg;
    String str1;
    String str2;
    String str3;
    if (e.a().k() == 2)
    {
      localHashtable1 = com.paypal.android.MEP.a.a.a;
      Vector localVector = (Vector)localHashtable1.get("FundingPlans");
      i1 = 0;
      if (i1 >= localVector.size())
        break label345;
      localc = (com.paypal.android.a.a.c)localVector.get(i1);
      k localk = (k)localc.d.get(0);
      localg = localk.b;
      str1 = localg.c();
      str2 = localg.a();
      if (!str1.equals("BALANCE"))
        break label248;
      str3 = str2 + "(" + localk.a.b() + ")";
    }
    label345: 
    while (true)
    {
      if (str1.equals("BANK_DELAYED"))
        str3 = str3 + " (" + j.a("ANDROID_echeck") + ")";
      Hashtable localHashtable2 = new Hashtable();
      localHashtable2.put("label", str3);
      localHashtable2.put("plan", localc);
      this.b.add(localHashtable2);
      i1++;
      break label38;
      localHashtable1 = com.paypal.android.a.c.f().h();
      break;
      label248: if (((str1.equals("BANK_DELAYED")) || (str1.equals("BANK_INSTANT")) || (str1.equals("CREDITCARD")) || (str1.equals("DEBITCARD"))) && (localg.b() != null) && (localg.b().length() > 0))
      {
        str3 = str2 + " x" + localg.b();
        continue;
        com.paypal.android.MEP.a.h.b();
      }
      else
      {
        str3 = str2;
      }
    }
  }

  public final void a()
  {
    switch (b.a[this.i.ordinal()])
    {
    default:
    case 2:
      do
        return;
      while (!this.a);
      this.a = false;
      com.paypal.android.a.c.f().a("delegate", this);
      return;
    case 3:
    }
    com.paypal.android.a.c.f().a("delegate", this);
    if (this.a)
    {
      this.a = false;
      return;
    }
    com.paypal.android.a.c.f().a(7);
  }

  public final void a(int paramInt)
  {
    this.r = paramInt;
    if (paramInt == 1)
    {
      switch (b.a[this.i.ordinal()])
      {
      default:
        return;
      case 1:
        if (e.a().k() == 2);
        for (Hashtable localHashtable = com.paypal.android.MEP.a.a.a; ; localHashtable = com.paypal.android.a.c.f().h())
        {
          Vector localVector = (Vector)localHashtable.get("FundingPlans");
          if ((localVector != null) && (localVector.size() != 0))
            break;
          c(true);
          com.paypal.android.a.c.f().a("delegate", this);
          com.paypal.android.a.c.f().a(5);
          return;
        }
        f();
        super.a(paramInt);
        return;
      case 2:
        e();
        String str = (String)((Hashtable)((Vector)com.paypal.android.a.c.f().h().get("PricingDetails")).get(0)).get("FeeBearer");
        TextView localTextView = q.a(com.paypal.android.a.r.d, getContext());
        localTextView.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localTextView.setBackgroundColor(0);
        localTextView.setText(j.a("ANDROID_choose_who_pays_the_fee") + ":");
        localTextView.setTextColor(-1);
        a(localTextView);
        int i1;
        if (str.compareTo("ApplyFeeToReceiver") == 0)
        {
          Button localButton2 = a(getContext(), j.a("ANDROID_i_pay"), 0);
          i1 = localButton2.getId();
          a(localButton2);
          localButton2.setNextFocusUpId(getId());
        }
        while (true)
        {
          setNextFocusDownId(i1);
          if (this.s != null)
            this.s.a(this, i1);
          super.a(paramInt);
          return;
          Button localButton1 = a(getContext(), j.a("NDROID_recipient_pays"), 1);
          i1 = localButton1.getId();
          a(localButton1);
          localButton1.setNextFocusUpId(getId());
        }
      case 3:
      }
      if (e.a().k() != 2)
        if ((Vector)PayPalActivity.a.h().get("AvailableAddresses") == null)
          this.b = null;
      while (true)
      {
        com.paypal.android.MEP.a.h.b();
        super.a(paramInt);
        return;
        this.b = new Vector();
        continue;
        if ((Vector)com.paypal.android.MEP.a.a.a.get("AvailableAddresses") == null)
          this.b = null;
        else
          this.b = new Vector();
      }
    }
    e();
    this.b = null;
    super.a(paramInt);
  }

  public final void a(int paramInt, Object paramObject)
  {
    q = false;
    switch (paramInt)
    {
    case 4:
    default:
    case 6:
    case 3:
    case 5:
    }
    while (true)
    {
      return;
      try
      {
        if (e.a().k() != 2)
          com.paypal.android.MEP.a.a.a = com.paypal.android.a.c.f().h();
        PayPalActivity.a().sendBroadcast(new Intent(PayPalActivity.g));
        return;
        com.paypal.android.a.c.f().a(6);
        return;
        f();
        if (((Vector)com.paypal.android.a.c.f().d("FundingPlans")).size() == 1)
        {
          b(false);
          PayPalActivity.a().sendBroadcast(new Intent(PayPalActivity.g));
          return;
        }
      }
      catch (Throwable localThrowable)
      {
      }
    }
  }

  public final void a(d paramd)
  {
    this.s = paramd;
  }

  public final void a(String paramString)
  {
    this.u = paramString;
    q = false;
    com.paypal.android.MEP.a.h.b();
  }

  public final void a(String paramString, Object paramObject)
  {
  }

  public final void a(boolean paramBoolean)
  {
    if (paramBoolean)
    {
      setBackgroundDrawable(this.h);
      return;
    }
    setBackgroundDrawable(this.g);
  }

  public final c b()
  {
    return this.i;
  }

  public final void c()
  {
    if (this.u != null)
    {
      this.n.a(this.u);
      this.u = null;
      c(false);
    }
    if (this.b != null)
    {
      c(false);
      super.a(1);
      e();
      switch (b.a[this.i.ordinal()])
      {
      case 2:
      default:
      case 1:
      case 3:
      }
    }
    int i9;
    int i10;
    int i11;
    int i12;
    label186: int i16;
    int i13;
    int i14;
    int i15;
    Hashtable localHashtable1;
    label412: Vector localVector;
    String str1;
    do
    {
      TextView localTextView2;
      do
      {
        return;
        localTextView2 = q.a(com.paypal.android.a.r.d, getContext());
        localTextView2.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
        localTextView2.setBackgroundColor(0);
        localTextView2.setText(j.a("ANDROID_change_funding") + ":");
        localTextView2.setTextColor(-1);
        if (this.b.size() > 0)
          a(localTextView2);
        i9 = 0;
        i10 = 0;
        i11 = 0;
        i12 = 0;
        if (i9 < this.b.size())
          try
          {
            Hashtable localHashtable2 = (Hashtable)this.b.get(i9);
            com.paypal.android.a.a.c localc = (com.paypal.android.a.a.c)localHashtable2.get("plan");
            if (e.a().k() == 2);
            Hashtable localHashtable3;
            for (Object localObject = com.paypal.android.MEP.a.a.a; ; localObject = localHashtable3)
            {
              if (((String)((Hashtable)localObject).get("FundingPlanId")).equals(localc.a()))
                break label1017;
              Button localButton2 = a(getContext(), (String)localHashtable2.get("label"), i12);
              i16 = localButton2.getId();
              this.p.add(localc.a());
              a(localButton2);
              if (i11 != 0)
                break;
              setNextFocusDownId(i16);
              i11 = 1;
              break;
              localHashtable3 = com.paypal.android.a.c.f().h();
            }
          }
          catch (Throwable localThrowable2)
          {
            i13 = i10;
            i14 = i11;
            i15 = i12;
          }
        if ((i10 != 0) && (this.s != null))
          this.s.a(this, i10);
      }
      while (i12 != 0);
      localTextView2.setText(" ");
      return;
      if (e.a().k() != 2)
        break;
      localHashtable1 = com.paypal.android.MEP.a.a.a;
      localVector = (Vector)localHashtable1.get("AvailableAddresses");
      str1 = (String)localHashtable1.get("ShippingAddressId");
    }
    while ((localVector == null) || (localVector.size() <= 1));
    TextView localTextView1 = q.a(com.paypal.android.a.r.d, getContext());
    localTextView1.setLayoutParams(new LinearLayout.LayoutParams(-2, -2));
    localTextView1.setBackgroundColor(0);
    label519: int i1;
    int i2;
    int i3;
    label547: com.paypal.android.a.a.h localh;
    if (e.a().l() == 1)
    {
      localTextView1.setText(j.a("ANDROID_change_mailing_address_to") + ":");
      localTextView1.setTextColor(-1);
      a(localTextView1);
      this.o.removeAllElements();
      i1 = 0;
      i2 = 0;
      i3 = 0;
      if (i1 >= localVector.size())
        break label946;
      localh = (com.paypal.android.a.a.h)localVector.elementAt(i1);
    }
    while (true)
    {
      try
      {
        String str2 = localh.d();
        String str3 = localh.e();
        String str4 = localh.b();
        String str5 = localh.g();
        String str6 = localh.f();
        StringBuilder localStringBuilder1 = new StringBuilder().append(str2);
        String str10;
        if (str2.length() > 0)
        {
          str7 = "\n";
          String str8 = str7;
          if (str3 != null)
          {
            StringBuilder localStringBuilder2 = new StringBuilder().append(str8).append(str3);
            if (str3.length() <= 0)
              break label1047;
            str9 = "\n";
            str8 = str9;
          }
          str10 = str8 + str4;
          if (str5 != null)
            str10 = str10 + ", " + str5;
          if (str6 != null)
            str10 = str10 + " " + str6;
          if (str1 == null)
            continue;
          boolean bool = str1.equals(localh.h());
          if (!bool)
            continue;
          i4 = i3;
          i1++;
          i3 = i4;
          break label547;
          localHashtable1 = com.paypal.android.a.c.f().h();
          break label412;
          localTextView1.setText(j.a("ANDROID_change_shipping_to") + ":");
          break label519;
        }
        String str7 = "";
        continue;
        Button localButton1 = a(getContext(), str10, i3);
        int i5 = localButton1.getId();
        this.o.add(localh.h());
        a(localButton1);
        if (i2 != 0)
          break label1003;
        setNextFocusDownId(i5);
        i6 = 1;
        int i7 = i3 + 1;
        int i8 = i6;
        i4 = i7;
        i2 = i8;
        continue;
      }
      catch (Throwable localThrowable1)
      {
        int i4 = i3;
        continue;
      }
      label946: if (this.b.size() == 0)
      {
        View localView = new View(getContext());
        localView.setMinimumWidth(10);
        localView.setMinimumHeight(10);
        a(localView);
      }
      if (i3 != 0)
        break;
      localTextView1.setText(" ");
      return;
      label1003: int i6 = i2;
      continue;
      i12++;
      i10 = i16;
      label1017: i13 = i10;
      i14 = i11;
      i15 = i12;
      i9++;
      i11 = i14;
      i12 = i15;
      i10 = i13;
      break label186;
      label1047: String str9 = "";
    }
  }

  public final void onClick(View paramView)
  {
    if (this.r == 0)
      this.n.c();
    super.onClick(paramView);
  }

  public final boolean onTouch(View paramView, MotionEvent paramMotionEvent)
  {
    switch (paramMotionEvent.getAction())
    {
    default:
      setBackgroundDrawable(this.g);
    case 0:
    }
    while (true)
    {
      return false;
      if (isClickable())
        setBackgroundDrawable(this.h);
    }
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     com.paypal.android.MEP.b.a
 * JD-Core Version:    0.6.2
 */